package com.cqjtu.eecs.service.impl;

import com.cqjtu.eecs.entity.GraduateRequirementTrainingGoalTemplate;
import com.cqjtu.eecs.entity.vo.GraduateRequirementTrainingGoalTemplateVo;
import com.cqjtu.eecs.mapper.GraduateRequirementTrainingGoalTemplateMapper;
import com.cqjtu.eecs.service.IGraduateRequirementTrainingGoalTemplateService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author
 * @since 2022-02-28
 */
@Service
public class GraduateRequirementTrainingGoalTemplateServiceImpl extends ServiceImpl<GraduateRequirementTrainingGoalTemplateMapper, GraduateRequirementTrainingGoalTemplate> implements IGraduateRequirementTrainingGoalTemplateService {

    @Resource
    private GraduateRequirementTrainingGoalTemplateMapper graduateRequirementTrainingGoalTemplateMapper;

    @Override
    public List<GraduateRequirementTrainingGoalTemplateVo> selectSupportMatrixByMajorCode(String majorCode) {
        return graduateRequirementTrainingGoalTemplateMapper.selectSupportMatrixByMajorCode(majorCode);
    }

    /**
     * 根据要求idList获取毕业要求和培目标的对应关系
     * @param idList
     * @return
     */
    @Override
    public List<GraduateRequirementTrainingGoalTemplate> listGraduateRequirementTrainingGoalTemplateByIdList(List<Integer> idList) {
        return graduateRequirementTrainingGoalTemplateMapper.listGraduateRequirementTrainingGoalTemplateByIdList(idList);
    }
}
